<template>
  <view class="not-found-container">
    <view class="not-found-content">
      <view class="error-code">404</view>
      <view class="error-title">页面不存在</view>
      <view class="error-description">抱歉，您访问的页面不存在或已被删除</view>
      <button class="back-button" @tap="goBack">返回首页</button>
    </view>
  </view>
</template>

<script setup>
// 组件名称
const name = 'NotFound'

// 返回首页方法
const goBack = () => {
  uni.switchTab({
    url: '/pages/index/index'
  })
}
</script>

<style lang="scss" scoped>
.not-found-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: #f5f5f5;
}

.not-found-content {
  text-align: center;
  padding: 40rpx;
}

.error-code {
  font-size: 120rpx;
  font-weight: bold;
  color: #999;
  margin-bottom: 20rpx;
}

.error-title {
  font-size: 40rpx;
  color: #333;
  margin-bottom: 20rpx;
}

.error-description {
  font-size: 28rpx;
  color: #666;
  margin-bottom: 60rpx;
}

.back-button {
  background-color: #007aff;
  color: white;
  border: none;
  padding: 20rpx 60rpx;
  border-radius: 10rpx;
  font-size: 32rpx;
  cursor: pointer;
  
  &:active {
    background-color: #0056b3;
  }
}
</style>